package com.example.trafnixapp;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;

public class ActivityPrincipal extends Activity {

	/** Called when the activity is first created. */
	DrawView drawView;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		drawView = new DrawView(this);
		drawView.setBackgroundColor(Color.WHITE);
		setContentView(drawView);
	}

	class DrawView extends View {
		Paint paint = new Paint();

		public DrawView(Context context) {
			super(context);
			paint.setColor(Color.BLUE);
		}

		@Override
		public void onDraw(Canvas canvas) {
			super.onDraw(canvas);
			canvas.drawLine(10, 20, 30, 40, paint);
			canvas.drawLine(20, 10, 50, 20, paint);

		}
	}
}